package com.feng.cloud.system.controller;

import com.feng.cloud.common.response.RestResponse;
import com.feng.cloud.system.entity.Dept;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * @ClassName IDeptController
 * @Description TODO
 * @Author Better Feng
 * @Date 2019/12/25 10:22
 * @Version 1.0
 **/
@RequestMapping("dept")
public interface IDeptController {


    /**
     * 删除部门
     * @param deptIds deptIds
     * @return RestResponse<Void>
     */
    @DeleteMapping("{deptIds}")
    RestResponse<Void> deleteDept(@NotBlank(message = "{required}") @PathVariable String deptIds);

    /**
     * 更新部门
     * @param dept dept
     * @return RestResponse<Dept>
     */
    @PutMapping
    RestResponse<Dept> updateDept(@Valid Dept dept);
    /**
     * 增加部门
     * @param dept dept
     * @return RestResponse<Dept>
     */
    @PostMapping
    RestResponse<Dept> addDept(@Valid Dept dept);
    /**
     * 查询列表
     * @param dept Dept
     * @return List<Dept>
     */
    @GetMapping("list")
    List<Dept> selectList(@RequestParam Dept dept);
    @GetMapping("test")
    List<Dept> list();
}
